package org.dromara.pill.domain.bo;

import org.dromara.pill.domain.PillDrug;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import org.dromara.common.core.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.*;

/**
 * 药品信息业务对象 pill_drug
 *
 * @author Lion Li
 * @date 2023-07-07
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = PillDrug.class, reverseConvertGenerate = false)
public class PillDrugBo extends BaseEntity {

    /**
     * 药品ID
     */
    @NotNull(message = "药品ID不能为空", groups = { EditGroup.class })
    private Long drugId;

    /**
     * 药品名称
     */
    @NotBlank(message = "药品名称不能为空", groups = { AddGroup.class, EditGroup.class })
    private String drugName;

    /**
     * 药品编码
     */
    @NotBlank(message = "药品编码不能为空", groups = { AddGroup.class, EditGroup.class })
    private String drugCode;

    /**
     * 生产厂家
     */
    @NotNull(message = "生产厂家不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long factoryId;

    /**
     * 药品类型
     */
    @NotBlank(message = "药品类型不能为空", groups = { AddGroup.class, EditGroup.class })
    private String drugType;

    /**
     * 处方类型
     */
    @NotBlank(message = "处方类型不能为空", groups = { AddGroup.class, EditGroup.class })
    private String prescriptionType;

    /**
     * 单位
     */
    @NotBlank(message = "单位不能为空", groups = { AddGroup.class, EditGroup.class })
    private String unit;

    /**
     * 价格
     */
    @NotNull(message = "价格不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long price;

    /**
     * 库存量
     */
    @NotNull(message = "库存量不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long num;

    /**
     * 预警值
     */
    @NotNull(message = "预警值不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long warnValue;

    /**
     * 换算量
     */
    @NotNull(message = "换算量不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long conversion;

    /**
     * 状态
     */
    @NotBlank(message = "状态不能为空", groups = { AddGroup.class, EditGroup.class })
    private String status;

    /**
     * 备注
     */
    @NotBlank(message = "备注不能为空", groups = { AddGroup.class, EditGroup.class })
    private String remark;


}
